#include <iostream>
#include <filesystem>
using namespace std;

#include "include/opencv2/opencv.hpp"
#include "include/opencv2/imgcodecs.hpp"
using namespace cv;

void say_hello()
{
#ifdef IS_LINUX
    cout << "hello from linux" << endl;
#else
    cout << "hello from other" << endl;
#endif
}

int main()
{
    cout << "start..." << endl;

    string base_path = std::filesystem::current_path();
    cout << "base dir path:" << base_path << endl;

    string image_source = base_path + "/../image/0.jpg";
    string image_left = base_path + "/../image/left.jpg";
    string image_right = base_path + "/../image/right.jpg";

    // 加载原图
    Mat img = imread(image_source);

    // 左转
    Mat mat_left;
    rotate(img, mat_left, ROTATE_90_COUNTERCLOCKWISE);
    imwrite(image_left, mat_left);

    // 右转
    Mat mat_right;
    rotate(img, mat_right, ROTATE_90_CLOCKWISE);
    imwrite(image_right, mat_right);

    // 
    say_hello();

    return 0;
}